<?php
$GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"] ?: array()) + array("t" . "i" . "t" . "l" . "e" => base64_decode("dGl0" . "bGU="), "_2bf42eca696835a6b9f1" . "12d504846082" => base64_decode("cmVwZWF0YWJ" . "sZQ=="), "_c78e2cab04076935f26a6" . "364a06dc390" => base64_decode("ZGVmYXVsdF9" . "2YWx1ZQ=="), "valu" . "es" => base64_decode("dmFsdW" . "Vz"), "_4d707fab93bebb" . "00bbe69e8159697" . "c90" => base64_decode(""), "_d4087cb8cecde1ebd9d2" . "76f3bdcb78e9" => base64_decode("Y2FsbF91c2V" . "yX2Z1bmM="), "_db6f0ba0791e9a635407659a9fe04" . "e40" => base64_decode("aXNfb2JqZWN" . "0"), "va" . "lu" . "e" => base64_decode("dmF" . "sdW" . "U="), "_88f66d03e16471401" . "59b3ce77d823c3c" => base64_decode("Ly4uLy4uL21ldGFfdHlwZXMuc" . "Ghw"), "_ae76ef27ae5b48757f71a202" . "718b5e5e" => base64_decode("Y2FsbF91c2VyX2Z1bmNfYXJyYXk" . "="), "n" . "a" . "m" . "e" => base64_decode("bmFtZ" . "Q=="), "_32b499fc" . "11cd875f1" . "96267f272" . "f05f63" => base64_decode("aW1wbGl" . "jaXQ="), "_4f86b8eb97e9f0" . "3cae7b27faceb62" . "8f4" => base64_decode("bWV0YV9od" . "G1sX3R5cG" . "U="), "_43e945f21660fb0d4a0d8b" . "7f66d695e9" => base64_decode("bWV0YV" . "90eXBl"), "_12c9aee000f1cc" . "8bcf9846556ecc3" . "544" => base64_decode("ZWRpdGF" . "ibGU="));
require_once __DIR__ . $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_88f66d03e164714" . "0159b3ce77d823c3" . "c"];








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["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_ae76ef27ae5b48757f" . "71a202718b5e5e"]($_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["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_d4087cb8cecde1ebd9d276f3bd" . "cb78e9"]($_dcd18f1ae5fbc1bd429492db158908aa, $value);
        }
        return array(0, $value, $GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_4d707fab93bebb00bbe6" . "9e8159697c90"]);
        
        
    }
    
    
    
    
    
    
    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["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_db6f0ba0791e9a635" . "407659a9fe04e40"]($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["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["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["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_c78e2cab040769" . "35f26a6364a06dc" . "390"]);
        $_f19b19c1cd042352369bc6920de25b88 =& $_fd9a001fe52a8a128ed79f490b895f76;
        $_43ac024c655665d883645a24a8b20230 = $this->GetDefaultValue();
        if ($GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_db6f0ba0791e9a635407659" . "a9fe04e40"]($_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"]["_2bf42eca696835a6b9f11" . "2d504846082"], $this->IsRepeatable() ? 1 : 0);
        $_01ad2b88da014f5bd99be3c718945059->setAttribute($GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_12c9aee000f1cc8bcf9846556ecc354" . "4"], $this->IsEditable() ? 1 : 0);
        $_01ad2b88da014f5bd99be3c718945059->setAttribute($GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_43e945f21660f" . "b0d4a0d8b7f66d" . "695e9"], $_43e945f21660fb0d4a0d8b7f66d695e9);
        $_01ad2b88da014f5bd99be3c718945059->setAttribute($GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_4f86b8eb97e9f03c" . "ae7b27faceb628f4"], $this->GetMetaHtmlType());
        $_01ad2b88da014f5bd99be3c718945059->setAttribute($GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_32b499fc11cd875f" . "196267f272f05f63"], $this->IsImplicit() ? 1 : 0);
        if ($_43e945f21660fb0d4a0d8b7f66d695e9 == META_TYPE_SELECT || $_43e945f21660fb0d4a0d8b7f66d695e9 == META_TYPE_MULTISELECT) {
            $_2564cccc3a35ec7f553d2dabc2e50aab = $_fc4ffcaec4dff19ed04cc1c9229222d1->createElement($GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["valu" . "es"]);
            $_b75f65c08f93763a543f5acde5a61d06 =& $_2564cccc3a35ec7f553d2dabc2e50aab;
            foreach ($this->values->values as $value => $_a51236f5e7f12cf84a776152098d24a9) {
                $_e31c1d1cdcbc777dfd0cc88f5a207fc3 = $_fc4ffcaec4dff19ed04cc1c9229222d1->createElement($GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["va" . "lu" . "e"]);
                $_fca0c1053f6278506e118640903cc932 =& $_e31c1d1cdcbc777dfd0cc88f5a207fc3;
                $_fca0c1053f6278506e118640903cc932->setAttribute($GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["val" . "ue"], $value);
                $_fca0c1053f6278506e118640903cc932->appendChild($_fc4ffcaec4dff19ed04cc1c9229222d1->createTextNode($_a51236f5e7f12cf84a776152098d24a9));
                $_b75f65c08f93763a543f5acde5a61d06->appendChild($_fca0c1053f6278506e118640903cc932);
            }
            $_01ad2b88da014f5bd99be3c718945059->appendChild($_b75f65c08f93763a543f5acde5a61d06);
        }
        return true;
    }
}