<?php

require_once "../../../class/Utils.php";
require_once "../../../class/DBWork.php";
require_once "../../../acct_class/DBJunpyoWork.php";
$gWork = new DBJunpyoWork(true);
try {
    //$gWork->createWork($_GET, true);
    $gWork->createWork($_POST, true);
    $gWork->requestBockSikTransaction();
    $data = array();
    while ($item = $gWork->fetchMapRow()) {
        if ($item['jakmok_code'] == 0 or $item['jakmok_code'] == '' or $item['jakmok_code'] == null) {
            $item['jakmok_code'] = '';
        } else {
            $item['jakmok_code'] = sprintf("%02d", $item['jakmok_code']);
        }
        if ($item["customer_id"] == 0 or $item["customer_id"] == '' or $item["customer_id"] == null) {
            $item["customer_id"] = '';
        } else {
            $item["customer_id"] = sprintf("%05d", $item["customer_id"]);
        }
        $month = (int) substr($item['jp_yyyymmdd'], 4, 2);
        $day = (int) substr($item['jp_yyyymmdd'], 6, 2);
        $item['jp_date_m'] = $month;
        $item['jp_date_d'] = $month;
        array_push($data, $item);
        if ($item['jp_view_gubun'] == 1 || $item['jp_view_gubun'] == 2) {
            $item['jp_id'] = '-1';
            $item['gycode'] = 101;
            if ($item['debit'] != 0) {
<?php

require_once "../../../class/Utils.php";
require_once "../../../class/DBWork.php";
require_once "../../../acct_class/DBJunpyoWork.php";
$gWork = new DBJunpyoWork(true);
try {
    $gWork->createWork($_POST, true);
    $res = $gWork->requestPagingSearch();
    $item = $gWork->fetchMixedRow();
    echo "{ CODE: '00', TOTAL : {$res} , ";
    echo 'DATA: [';
    if (count($item) > 0) {
        while (true) {
            $jp_group = '';
            if ($item['jp_view_gubun'] == 3 || $item['jp_view_gubun'] == 4) {
                $jp_group = $item['jp_yyyymmdd'] . $item['jp_no'];
            }
            $jcode = $item['jakmok_code'];
            if ($jcode == 0 or $jcode == '' or $jcode == null) {
                $jcode = '';
            } else {
                $jcode = sprintf("%02d", $jcode);
            }
            $cuscode = $item["customer_id"];
            if ($cuscode == 0 or $cuscode == '' or $cuscode == null) {
                $cuscode = '';
            } else {
                $cuscode = sprintf("%05d", $cuscode);
            }
            $month = (int) substr($item['jp_yyyymmdd'], 4, 2);
<?php

require_once "../../../class/Utils.php";
require_once "../../../class/DBWork.php";
require_once "../../../acct_class/DBJunpyoWork.php";
$gWork = new DBJunpyoWork(true);
try {
    $gWork->createWork($_POST, true);
    $res = $gWork->requestRegBankData();
    $gWork->destoryWork();
    echo "{ CODE: '00', ";
    echo "DATA: [";
    if (count($res) > 0) {
        for ($idx = 0; $idx < count($res); $idx++) {
            for ($i = 0; $i < count($res[$idx]); $i++) {
                echo "{ cd: '" . $res[$idx][$i]['code'] . "', jp_id: '" . $res[$idx][$i]['jp_id'] . "', jp_match_id: '" . $res[$idx][$i]['jp_match_id'] . "', jp_no: '" . $res[$idx][$i]['jp_no'] . "', jp_yyyymmdd: '" . $res[$idx][$i]['jp_yyyymmdd'] . "' },";
            }
        }
        echo "]}";
    } else {
        echo ']}';
    }
} catch (Exception $e) {
    $gWork->destoryWork();
    $err = $e->getMessage();
    Util::serverLog($e);
    echo "{ CODE: '99' , DATA : '{$err}'}";
    exit;
}
<?php

require_once "../../../class/Utils.php";
require_once "../../../class/DBWork.php";
require_once "../../../acct_class/DBJunpyoWork.php";
$gWork = new DBJunpyoWork(true);
try {
    $gWork->createWork($_POST, false);
    $res = $gWork->requestDelete();
    $gWork->destoryWork();
    echo "{ CODE: '00', ";
    echo "DATA: [";
    if (count($res) > 0) {
        for ($idx = 0; $idx < count($res); $idx++) {
            echo "{ cd: '" . $res[$idx]['code'] . "' }";
            if ($i != count($res) - 1) {
                echo ",";
            }
        }
        echo ']}';
    } else {
        echo ']}';
    }
} catch (Exception $e) {
    $gWork->destoryWork();
    $err = $e->getMessage();
    Util::serverLog($e);
    echo "{ CODE: '99' , DATA : '{$err}'}";
    exit;
}
<?php

require_once "../../../class/Utils.php";
require_once "../../../class/DBWork.php";
require_once "../../../acct_class/DBJunpyoWork.php";
$gWork = new DBJunpyoWork(true);
try {
    $gWork->createWork($_POST, true);
    $res = $gWork->requestAdvList();
    $item = $gWork->fetchMixedRow();
    echo '{ CODE: "00", ';
    echo 'DATA: [';
    if (count($item) > 0) {
        while (true) {
            $jp_group = '';
            if ($item['jp_view_gubun'] == 3 || $item['jp_view_gubun'] == 4) {
                $jp_group = $item['jp_yyyymmdd'] . $item['jp_no'];
            }
            $jcode = $item['jakmok_code'];
            if ($jcode == 0 or $jcode == '' or $jcode == null) {
                $jcode = '';
            } else {
                $jcode = sprintf("%02d", $jcode);
            }
            $cuscode = $item["customer_id"];
            if ($cuscode == 0 or $cuscode == '' or $cuscode == null) {
                $cuscode = '';
            } else {
                $cuscode = sprintf("%05d", $cuscode);
            }
            $match_cuscode = $item["match_customer_id"];
<?php

require_once "../../../class/Utils.php";
require_once "../../../class/DBWork.php";
require_once "../../../acct_class/DBJunpyoWork.php";
$gWork = new DBJunpyoWork(true);
try {
    $gWork->createWork($_POST, true);
    $res = $gWork->requestPrintUpdate();
    $gWork->destoryWork();
    echo "{ CODE: '00', DATA : " . json_encode($res) . "}";
    /*
    		echo "{ CODE: '00', ";
    		echo "DATA: [";
    		
    		if(count($res) > 0)
    		{
    			for($idx=0;$idx<count($res);$idx++){
    					echo "{ cd: '".$res[$idx]['code']."', jp_id: '".$res[$idx]['jp_id']."', jp_match_id: '".$res[$idx]['jp_match_id']."', jp_no: '".$res[$idx][$i]['jp_no']."', jp_yyyymmdd: '".$res[$idx][$i]['jp_yyyymmdd']."' },";
    			}
    			echo "]}";
    		}
    		else
    		{
    			echo ']}';	
    		}
    */
} catch (Exception $e) {
    $gWork->destoryWork();
    $err = $e->getMessage();
    Util::serverLog($e);