<?php
$GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"] ?: array()) + array("_4f86b8eb97e9f03cae7b27fa" . "ceb628f4" => base64_decode("bWV0YV9odG1s" . "X3R5cGU="), "va" . "lu" . "e" => base64_decode("dmFsdWU" . "="), "_db6f0ba0791e9a635407659a9fe04e4" . "0" => base64_decode("aXNfb2Jq" . "ZWN0"), "_43e945f21660fb0d4a0d8b7f66d6" . "95e9" => base64_decode("bWV0YV" . "90eXBl"), "_c78e2cab04076935f26a" . "6364a06dc390" => base64_decode("ZGVmYXVsdF92Y" . "Wx1ZQ=="), "_ae76ef27ae5b48757" . "f71a202718b5e5e" => base64_decode("Y2FsbF91c2VyX2Z1bmNfYXJyYXk" . "="), "titl" . "e" => base64_decode("dGl0" . "bGU="), "nam" . "e" => base64_decode("bmF" . "tZQ" . "=="), "_4d707fab" . "93bebb00b" . "be69e8159" . "697c90" => base64_decode(""), "_d4087cb8cecde1ebd9d276f3bd" . "cb78e9" => base64_decode("Y2FsbF91c2VyX2Z1bm" . "M="), "valu" . "es" => base64_decode("dm" . "Fs" . "dW" . "Vz"), "_88f66d03e164714" . "0159b3ce77d823c3" . "c" => base64_decode("Ly4uLy4uL21ldGFfdHlwZX" . "MucGhw"), "_32b499fc11cd875f196267f" . "272f05f63" => base64_decode("aW1w" . "bGlj" . "aXQ="), "_2bf42eca696835a6b9f112d50484" . "6082" => base64_decode("cmVwZ" . "WF0YW" . "JsZQ=" . "="), "_12c9aee000f1cc8bcf9846556ecc" . "3544" => base64_decode("ZWRpdGFib" . "GU="));
require_once __DIR__ . $GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_88f66d03e1647140159b3" . "ce77d823c3c"];








class MetaFieldPrototype extends ErrorHandler
{
    var $name;
    var $title;
    var $editable = true;
    var $default_value;
    var $repeatable = false;
    var $meta_type = META_TYPE_DEFAULT;
    var $meta_html_type = HTML_COMPONENT_TEXTAREA;
    
    
    
    
    var $values = null;
    var $visible = true;
    var $implicit = false;
    var $searchable = false;
    var $mandatory = false;
    var $inheritable = false;
    var $is_system = false;
    public function __construct()
    {
    }
    
    
    
    
    
    
    public function GetName()
    {
        return $this->name;
    }
    
    
    
    
    
    
    public function GetTitle()
    {
        return $this->title;
    }
    
    
    
    
    
    
    
    
    public function UseGetWrapper($values, $type = -1)
    {
        if ($type == -1) {
            $type = $this->GetMetaType();
        }
        global $META_TYPE_CALLBACK;
        $_dcd18f1ae5fbc1bd429492db158908aa = $META_TYPE_CALLBACK[$type][0];
        if ($_dcd18f1ae5fbc1bd429492db158908aa) {
            return $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_ae76ef27ae5b" . "48757f71a2027" . "18b5e5e"]($_dcd18f1ae5fbc1bd429492db158908aa, $values);
        }
        return $values[1];
        
        
    }
    
    
    
    
    
    
    
    
    
    public function UseSetWrapper($value, $type = -1)
    {
        if ($type == -1) {
            $type = $this->GetMetaType();
        }
        global $META_TYPE_CALLBACK;
        $_dcd18f1ae5fbc1bd429492db158908aa = $META_TYPE_CALLBACK[$type][1];
        if ($_dcd18f1ae5fbc1bd429492db158908aa) {
            return $GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_d4087cb8cecde1ebd9d276f3bdcb78e" . "9"]($_dcd18f1ae5fbc1bd429492db158908aa, $value);
        }
        return array(0, $value, $GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["_4d707fab93beb" . "b00bbe69e81596" . "97c90"]);
        
        
    }
    
    
    
    
    
    
    public function GetDefaultValue()
    {
        if ($this->default_value === null) {
            return null;
        }
        return $this->UseGetWrapper(array($this->default_value, $this->default_value, $this->default_value));
    }
    
    
    
    
    
    
    public function GetMetaType()
    {
        return $this->meta_type;
    }
    
    
    
    
    
    
    public function GetMetaHtmlType()
    {
        return $this->meta_html_type;
    }
    
    
    
    
    
    
    public function GetAllValues()
    {
        if ($GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["_db6f0ba" . "0791e9a6" . "35407659" . "a9fe04e4" . "0"]($this->values)) {
            return $this->values->GetAllValues();
        } else {
            return array();
        }
    }
    
    
    
    
    
    
    public function GetDBFieldName()
    {
        global $META_TYPE_DB_MAP;
        $_c8b8645bdd969f28aa6dddecbdc4216b = $META_TYPE_DB_MAP[$this->GetMetaType()];
        if (!$_c8b8645bdd969f28aa6dddecbdc4216b) {
            $_c8b8645bdd969f28aa6dddecbdc4216b = $META_TYPE_DB_MAP[META_TYPE_DEFAULT];
        }
        return $_c8b8645bdd969f28aa6dddecbdc4216b;
    }
    
    
    
    
    public function IsRepeatable()
    {
        return $this->repeatable;
    }
    
    
    
    
    public function IsEditable()
    {
        return $this->editable;
    }
    
    
    
    
    public function IsImplicit()
    {
        return $this->implicit;
    }
    
    
    
    
    public function IsVisible()
    {
        return $this->visible;
    }
    
    
    
    
    public function IsInheritable()
    {
        return $this->inheritable;
    }
    
    
    
    
    public function IsMandatory()
    {
        return $this->mandatory;
    }
    
    
    
    
    
    
    
    public function Export(DOMNode $_01ad2b88da014f5bd99be3c718945059)
    {
        $_fc4ffcaec4dff19ed04cc1c9229222d1 = $_01ad2b88da014f5bd99be3c718945059->ownerDocument;
        $_01ad2b88da014f5bd99be3c718945059->setAttribute($GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["nam" . "e"], $this->GetName());
        $_0c8b25e8088aef08bb5aa007cf3caf8e = $_fc4ffcaec4dff19ed04cc1c9229222d1->createElement($GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["ti" . "tl" . "e"]);
        $_1bbad6caaa460fa8ec8ab085a2181675 =& $_0c8b25e8088aef08bb5aa007cf3caf8e;
        $_18409c82c1e5ec574a895d8b95157b93 = $_fc4ffcaec4dff19ed04cc1c9229222d1->createTextNode($this->GetTitle());
        $_092ec6e95cb26d65001e0947825f715d =& $_18409c82c1e5ec574a895d8b95157b93;
        $_1bbad6caaa460fa8ec8ab085a2181675->appendChild($_092ec6e95cb26d65001e0947825f715d);
        $_01ad2b88da014f5bd99be3c718945059->appendChild($_1bbad6caaa460fa8ec8ab085a2181675);
        $_43e945f21660fb0d4a0d8b7f66d695e9 = $this->GetMetaType();
        $_fd9a001fe52a8a128ed79f490b895f76 = $_fc4ffcaec4dff19ed04cc1c9229222d1->createElement($GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_c78e2cab04076935f26a6364a06dc" . "390"]);
        $_f19b19c1cd042352369bc6920de25b88 =& $_fd9a001fe52a8a128ed79f490b895f76;
        $_43ac024c655665d883645a24a8b20230 = $this->GetDefaultValue();
        if ($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_db6f0ba0" . "791e9a635" . "407659a9f" . "e04e40"]($_43ac024c655665d883645a24a8b20230)) {
            if ($_43e945f21660fb0d4a0d8b7f66d695e9 == META_TYPE_DATETIME) {
                $_43ac024c655665d883645a24a8b20230 = $_43ac024c655665d883645a24a8b20230->getDate(DATE_FORMAT_TIMESTAMP);
            } elseif ($_43e945f21660fb0d4a0d8b7f66d695e9 == META_TYPE_DATE) {
                $_43ac024c655665d883645a24a8b20230 = $_43ac024c655665d883645a24a8b20230->getDate(DATE_FORMAT_DATE_DAY);
            } elseif ($_43e945f21660fb0d4a0d8b7f66d695e9 == META_TYPE_DATE_NO_YEAR) {
                $_43ac024c655665d883645a24a8b20230 = $_43ac024c655665d883645a24a8b20230->getDate(DATE_FORMAT_DATE_DAY);
            }
        }
        $_3ab728f4b2af787f1c72a357e9acc5b9 = $_fc4ffcaec4dff19ed04cc1c9229222d1->createTextNode($_43ac024c655665d883645a24a8b20230);
        $_2db92bb9f1e2909ebdab5ddb423aafe3 =& $_3ab728f4b2af787f1c72a357e9acc5b9;
        $_f19b19c1cd042352369bc6920de25b88->appendChild($_2db92bb9f1e2909ebdab5ddb423aafe3);
        $_01ad2b88da014f5bd99be3c718945059->appendChild($_f19b19c1cd042352369bc6920de25b88);
        $_01ad2b88da014f5bd99be3c718945059->setAttribute($GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_2bf42eca696835a6b" . "9f112d504846082"], $this->IsRepeatable() ? 1 : 0);
        $_01ad2b88da014f5bd99be3c718945059->setAttribute($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_12c9aee000f1cc8bcf9846556ecc" . "3544"], $this->IsEditable() ? 1 : 0);
        $_01ad2b88da014f5bd99be3c718945059->setAttribute($GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_43e945f21660fb0d4a" . "0d8b7f66d695e9"], $_43e945f21660fb0d4a0d8b7f66d695e9);
        $_01ad2b88da014f5bd99be3c718945059->setAttribute($GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_4f86b8eb97e9f03cae7b27fa" . "ceb628f4"], $this->GetMetaHtmlType());
        $_01ad2b88da014f5bd99be3c718945059->setAttribute($GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_32b499fc11cd875f196" . "267f272f05f63"], $this->IsImplicit() ? 1 : 0);
        if ($_43e945f21660fb0d4a0d8b7f66d695e9 == META_TYPE_SELECT || $_43e945f21660fb0d4a0d8b7f66d695e9 == META_TYPE_MULTISELECT) {
            $_2564cccc3a35ec7f553d2dabc2e50aab = $_fc4ffcaec4dff19ed04cc1c9229222d1->createElement($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["value" . "s"]);
            $_b75f65c08f93763a543f5acde5a61d06 =& $_2564cccc3a35ec7f553d2dabc2e50aab;
            foreach ($this->values->values as $value => $_a51236f5e7f12cf84a776152098d24a9) {
                $_e31c1d1cdcbc777dfd0cc88f5a207fc3 = $_fc4ffcaec4dff19ed04cc1c9229222d1->createElement($GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["val" . "ue"]);
                $_fca0c1053f6278506e118640903cc932 =& $_e31c1d1cdcbc777dfd0cc88f5a207fc3;
                $_fca0c1053f6278506e118640903cc932->setAttribute($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["v" . "a" . "l" . "u" . "e"], $value);
                $_fca0c1053f6278506e118640903cc932->appendChild($_fc4ffcaec4dff19ed04cc1c9229222d1->createTextNode($_a51236f5e7f12cf84a776152098d24a9));
                $_b75f65c08f93763a543f5acde5a61d06->appendChild($_fca0c1053f6278506e118640903cc932);
            }
            $_01ad2b88da014f5bd99be3c718945059->appendChild($_b75f65c08f93763a543f5acde5a61d06);
        }
        return true;
    }
}