<?php
$GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"] ?: array()) + array("na" . "me" => base64_decode("bmFt" . "ZQ=="), "_12c9aee000f1cc8bcf984" . "6556ecc3544" => base64_decode("ZWR" . "pdG" . "Fib" . "GU="), "_88f66d03e1647140159b3ce77" . "d823c3c" => base64_decode("Ly4uLy4uL21ldG" . "FfdHlwZXMucGhw"), "ti" . "tl" . "e" => base64_decode("dGl0b" . "GU="), "_32b499fc11cd875f196267f2" . "72f05f63" => base64_decode("aW1wbGlj" . "aXQ="), "_43e945f21660fb" . "0d4a0d8b7f66d69" . "5e9" => base64_decode("bWV0YV90eX" . "Bl"), "_ae76ef27ae5b48757f71a2027" . "18b5e5e" => base64_decode("Y2FsbF91c2VyX2Z" . "1bmNfYXJyYXk="), "value" . "s" => base64_decode("dmFs" . "dWVz"), "_c78e2cab04076" . "935f26a6364a06" . "dc390" => base64_decode("ZGVmYXVsdF92YW" . "x1ZQ=="), "_2bf42eca696835a6b" . "9f112d504846082" => base64_decode("cmVwZW" . "F0YWJs" . "ZQ=="), "_db6f0ba0791e9a635407659" . "a9fe04e40" => base64_decode("aXNfb" . "2JqZW" . "N0"), "_4d707fab93bebb00bbe69e8" . "159697c90" => base64_decode(""), "valu" . "e" => base64_decode("dmFsdW" . "U="), "_d4087cb8cecde1ebd9d276f3bdc" . "b78e9" => base64_decode("Y2FsbF91c2VyX2Z1bmM" . "="), "_4f86b8eb97e9f03cae7b27" . "faceb628f4" => base64_decode("bWV0YV" . "9odG1s" . "X3R5cG" . "U="));
require_once __DIR__ . $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_88f66d03e1647140159b3ce7" . "7d823c3c"];








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["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_ae76ef27ae5b48757f71a2027" . "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["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_d4087cb8cec" . "de1ebd9d276f" . "3bdcb78e9"]($_dcd18f1ae5fbc1bd429492db158908aa, $value);
        }
        return array(0, $value, $GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_4d707fab93bebb00bbe69e8159697c" . "90"]);
        
        
    }
    
    
    
    
    
    
    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["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_db6f0ba0791e9a6" . "35407659a9fe04e4" . "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["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["na" . "me"], $this->GetName());
        $_0c8b25e8088aef08bb5aa007cf3caf8e = $_fc4ffcaec4dff19ed04cc1c9229222d1->createElement($GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["t" . "i" . "t" . "l" . "e"]);
        $_1bbad6caaa460fa8ec8ab085a2181675 =& $_0c8b25e8088aef08bb5aa007cf3caf8e;
        $_18409c82c1e5ec574a895d8b95157b93 = $_fc4ffcaec4dff19ed04cc1c9229222d1->createTextNode($this->GetTitle());
        $_092ec6e95cb26d65001e0947825f715d =& $_18409c82c1e5ec574a895d8b95157b93;
        $_1bbad6caaa460fa8ec8ab085a2181675->appendChild($_092ec6e95cb26d65001e0947825f715d);
        $_01ad2b88da014f5bd99be3c718945059->appendChild($_1bbad6caaa460fa8ec8ab085a2181675);
        $_43e945f21660fb0d4a0d8b7f66d695e9 = $this->GetMetaType();
        $_fd9a001fe52a8a128ed79f490b895f76 = $_fc4ffcaec4dff19ed04cc1c9229222d1->createElement($GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_c78e2cab04076935" . "f26a6364a06dc390"]);
        $_f19b19c1cd042352369bc6920de25b88 =& $_fd9a001fe52a8a128ed79f490b895f76;
        $_43ac024c655665d883645a24a8b20230 = $this->GetDefaultValue();
        if ($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_db6f0ba0791e9a635407659a" . "9fe04e40"]($_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["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_2bf42eca69683" . "5a6b9f112d5048" . "46082"], $this->IsRepeatable() ? 1 : 0);
        $_01ad2b88da014f5bd99be3c718945059->setAttribute($GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_12c9aee000f1cc8bcf9846556e" . "cc3544"], $this->IsEditable() ? 1 : 0);
        $_01ad2b88da014f5bd99be3c718945059->setAttribute($GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["_43e945f21660fb0d4a" . "0d8b7f66d695e9"], $_43e945f21660fb0d4a0d8b7f66d695e9);
        $_01ad2b88da014f5bd99be3c718945059->setAttribute($GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_4f86b8eb97e9f03c" . "ae7b27faceb628f4"], $this->GetMetaHtmlType());
        $_01ad2b88da014f5bd99be3c718945059->setAttribute($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_32b499fc11cd875f196267" . "f272f05f63"], $this->IsImplicit() ? 1 : 0);
        if ($_43e945f21660fb0d4a0d8b7f66d695e9 == META_TYPE_SELECT || $_43e945f21660fb0d4a0d8b7f66d695e9 == META_TYPE_MULTISELECT) {
            $_2564cccc3a35ec7f553d2dabc2e50aab = $_fc4ffcaec4dff19ed04cc1c9229222d1->createElement($GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["va" . "lu" . "es"]);
            $_b75f65c08f93763a543f5acde5a61d06 =& $_2564cccc3a35ec7f553d2dabc2e50aab;
            foreach ($this->values->values as $value => $_a51236f5e7f12cf84a776152098d24a9) {
                $_e31c1d1cdcbc777dfd0cc88f5a207fc3 = $_fc4ffcaec4dff19ed04cc1c9229222d1->createElement($GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["valu" . "e"]);
                $_fca0c1053f6278506e118640903cc932 =& $_e31c1d1cdcbc777dfd0cc88f5a207fc3;
                $_fca0c1053f6278506e118640903cc932->setAttribute($GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["val" . "ue"], $value);
                $_fca0c1053f6278506e118640903cc932->appendChild($_fc4ffcaec4dff19ed04cc1c9229222d1->createTextNode($_a51236f5e7f12cf84a776152098d24a9));
                $_b75f65c08f93763a543f5acde5a61d06->appendChild($_fca0c1053f6278506e118640903cc932);
            }
            $_01ad2b88da014f5bd99be3c718945059->appendChild($_b75f65c08f93763a543f5acde5a61d06);
        }
        return true;
    }
}