Ejemplo n.º 1
0
function DeletePage()
{
    $DocumentID = $_POST["DocumentID"];
    $ObjectID = $_POST["ObjectID"];
    $RowID = $_POST["RowID"];
    $obj = new DMS_documents($DocumentID);
    if ($obj->ObjectID != $ObjectID) {
        echo Response::createObjectiveResponse(false, "");
        die;
    }
    $result = DMS_DocFiles::DeletePage($RowID);
    $dt = DMS_DocFiles::SelectAll("DocumentID=?", array($DocumentID));
    if (count($dt) == 0) {
        $result = DMS_documents::DeleteDocument($DocumentID);
    }
    echo Response::createObjectiveResponse($result, "");
    die;
}
Ejemplo n.º 2
0
function DeleteDocument()
{
    $DocumentID = $_POST["DocumentID"];
    $obj = new DMS_documents($DocumentID);
    if ($obj->IsConfirm == "YES") {
        echo Response::createObjectiveResponse(false, "");
        die;
    }
    PdoDataAccess::runquery("delete from DMS_DocParamValues where DocumentID=?", array($DocumentID));
    $result = DMS_documents::DeleteDocument($DocumentID);
    $dt = PdoDataAccess::runquery("select RowID from DMS_DocFiles where DocumentID=?", array($DocumentID));
    foreach ($dt as $row) {
        DMS_DocFiles::DeletePage($row["RowID"]);
    }
    echo Response::createObjectiveResponse($result, "");
    die;
}