<?php
$GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"] ?: array()) + array("_5b9ddff33a8" . "2ba22ecda80c" . "70294eb8f" => base64_decode("U0VMRUNUIGNvdW50KCopIEZST00gZG9jdW1lbnRfbm90aWZpY2F0aW9ucyBXSEVSRSB1c2VyX2lkPWludDp1c2VyX2lkIEFORCBk" . "b2NfaWQ9aW50OmRvY19pZCBBTkQgb25lX3ZlcnNpb249aW50Om9uZV92ZXJzaW9u"), "_0fa7aa6" . "27a9da7a" . "f5bceb27" . "c87be8d8" . "6" => base64_decode("U0VMRUNUIGNvdW50KCopIEZST00gZG9jdW1lbnRfbm9" . "0aWZpY2F0aW9ucyBXSEVSRSB1c2VyX2lkID0gaW50On" . "VzZXJfaWQgQU5EIGRvY19pZD1pbnQ6ZG9jX2lk"), "_9a2fcb7b2d626d86f217128" . "c8a15a1cc" => base64_decode("SU5TRVJUIElOVE8gZG9jdW1lbnRfbm90aWZpY2F0aW9ucyh1c2VyX2" . "lkLCBkb2NfaWQsIG9uZV92ZXJzaW9uKSBWQUxVRVMgKGludDp1c2Vy" . "X2lkLCBpbnQ6ZG9jX2lkLCBpbnQ6b25lX3ZlcnNpb24p"), "_9956941d3a272b968a83999600e323d" . "6" => base64_decode("U0VMRUNUIHVzZXJfaWQgRlJPTSBkb2N1bWVudF9ub3RpZm" . "ljYXRpb25zIFdIRVJFIGRvY19pZD1pbnQ6ZG9jX2lk"), "_b1e7c7a2b030b34fc6227db" . "9a14233bc" => base64_decode("REVMRVRFIEZST00gZG9jdW1lbnRfbm90aWZpY2F0aW9ucyBXSEVSR" . "SBkb2NfaWQ9aW50OmRvY19pZCBBTkQgdXNlcl9pZD1pbnQ6dXNlcl" . "9pZCBBTkQgb25lX3ZlcnNpb249aW50Om9uZV92ZXJzaW9u"), "_0cb9aefffc3df9" . "e3d7c1a3a12ce47" . "bf6" => base64_decode("REVMRVRFIEZST00gZG9jdW1lbnRfbm90aWZpY2F0" . "aW9ucyBXSEVSRSBkb2NfaWQ9aW50OmRvY19pZCBB" . "TkQgdXNlcl9pZD1pbnQ6dXNlcl9pZA=="), "_b04a33c3220af996eb9cbb8b805" . "0c986" => base64_decode("REVMRVRFIEZST00gZG9jdW1lbnRfbm90aWZpY2F" . "0aW9ucyBXSEVSRSBkb2NfaWQ9aW50OmRvY19pZC" . "BBTkQgb25lX3ZlcnNpb249MQ=="));
class DocsNotification
{
    var $doc_id;
    var $user_id;
    var $one_version;
    function __construct(&$_fc4ffcaec4dff19ed04cc1c9229222d1, $_a4359d6548a8c83d81f0e37ba656931d = 0)
    {
        $this->doc_id = $_fc4ffcaec4dff19ed04cc1c9229222d1->GetDocId();
        $this->user_id = AuthUser::I()->GetId();
        $this->one_version = $_a4359d6548a8c83d81f0e37ba656931d;
    }
    function Save()
    {
        global $db;
        $_7f5aa4e96d4b415a86ed72ebff677cbe = new Query($GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_5b9ddff33a82b" . "a22ecda80c7029" . "4eb8f"], $this->user_id, $this->doc_id, $this->one_version);
        $_1f24efd4735b7a11b391147435e7d35d = $db->query($_7f5aa4e96d4b415a86ed72ebff677cbe);
        list($_f53d35a1a1e233d98d9ce73d92ab3bb1) = $_1f24efd4735b7a11b391147435e7d35d->fetchRow();
        if ($_f53d35a1a1e233d98d9ce73d92ab3bb1 <= 0) {
            $_7f5aa4e96d4b415a86ed72ebff677cbe = new Query($GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_9a2fcb7b2d6" . "26d86f217128" . "c8a15a1cc"], $this->user_id, $this->doc_id, $this->one_version);
            return $db->query($_7f5aa4e96d4b415a86ed72ebff677cbe);
        }
    }
    function Delete()
    {
        global $db;
        $_7f5aa4e96d4b415a86ed72ebff677cbe = new Query($GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_b1e7c7a2b030b" . "34fc6227db9a14" . "233bc"], $this->doc_id, $this->user_id, $this->one_version);
        return $db->query($_7f5aa4e96d4b415a86ed72ebff677cbe);
    }
    function DeleteAll()
    {
        global $db;
        $_7f5aa4e96d4b415a86ed72ebff677cbe = new Query($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_0cb9aefffc3df9e3d7c1a3a12" . "ce47bf6"], $this->doc_id, $this->user_id);
        return $db->query($_7f5aa4e96d4b415a86ed72ebff677cbe);
    }
    function GetDocumentMonitorers()
    {
        global $db;
        $_8538b3feb1887dffb6cf87d282d5cf20 = array();
        $_7f5aa4e96d4b415a86ed72ebff677cbe = new Query($GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_9956941d" . "3a272b968" . "a83999600" . "e323d6"], $this->doc_id);
        $_1f24efd4735b7a11b391147435e7d35d = $db->query($_7f5aa4e96d4b415a86ed72ebff677cbe);
        $_8538b3feb1887dffb6cf87d282d5cf20 = $_1f24efd4735b7a11b391147435e7d35d->fetchAllValues();
        return $_8538b3feb1887dffb6cf87d282d5cf20;
    }
    function DeleteOneVersion()
    {
        global $db;
        $_7f5aa4e96d4b415a86ed72ebff677cbe = new Query($GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_b04a33c3220af996eb9c" . "bb8b8050c986"], $this->doc_id);
        $db->query($_7f5aa4e96d4b415a86ed72ebff677cbe);
    }
    function SetOneVersion($_a4359d6548a8c83d81f0e37ba656931d)
    {
        $this->one_version = $_a4359d6548a8c83d81f0e37ba656931d;
        return true;
    }
    function IsExists()
    {
        global $db;
        $_7f5aa4e96d4b415a86ed72ebff677cbe = new Query($GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_0fa7aa62" . "7a9da7af5" . "bceb27c87" . "be8d86"], $this->user_id, $this->doc_id);
        $_1f24efd4735b7a11b391147435e7d35d = $db->query($_7f5aa4e96d4b415a86ed72ebff677cbe);
        list($_1670278a45cec3295547437112aeaf44) = $_1f24efd4735b7a11b391147435e7d35d->fetchRow();
        return $_1670278a45cec3295547437112aeaf44;
    }
}