Пример #1
0
<?php

require_once "../../../class/Utils.php";
require_once "../../../class/DBWork.php";
require_once "../../../acct_class/DBItemGrpWork.php";
$iWork = new DBItemGrpWork(true);
try {
    $iWork->createWork($_POST, true);
    $res = $iWork->requestDelete();
    $iWork->destoryWork();
    echo "{CODE: '00'}";
} catch (Exception $e) {
    $iWork->destoryWork();
    $err = $e->getMessage();
    Util::serverLog($e);
    echo "{ CODE: '99' , DATA : '{$err}'}";
    exit;
}
Пример #2
0
<?php

require_once "../../../class/Utils.php";
require_once "../../../class/DBWork.php";
require_once "../../../acct_class/DBItemGrpWork.php";
$iWork = new DBItemGrpWork(true);
try {
    $iWork->createWork(-1, true);
    $res = $iWork->requestList();
    $result = array();
    while ($item = $iWork->fetchMapRow()) {
        $item['itemgrp_cd'] = sprintf("%03d", $item['itemgrp_cd']);
        array_push($result, $item);
    }
    echo "{ CODE: '00', DATA : " . json_encode($result) . "}";
    $iWork->destoryWork();
} catch (Exception $e) {
    $iWork->destoryWork();
    $err = $e->getMessage();
    Util::serverLog($e);
    echo "{ CODE: '99' , DATA : '{$err}'}";
    exit;
}
Пример #3
0
<?php

require_once "../../../class/Utils.php";
require_once "../../../class/DBWork.php";
require_once "../../../acct_class/DBItemGrpWork.php";
$iWork = new DBItemGrpWork(true);
try {
    $iWork->createWork($_POST, true);
    $res = $iWork->requestRegModify();
    $iWork->destoryWork();
    if ($res > 0) {
        echo '{CODE: "00"}';
    } else {
        echo '{CODE: "99"}';
    }
} catch (Exception $e) {
    $iWork->destoryWork();
    $err = $e->getMessage();
    Util::serverLog($e);
    echo "{ CODE: '99' , DATA : '{$err}'}";
    exit;
}