function &execute() { $V21ffce5b = $this->_getCommandParams(); $this->_setSortParams($V21ffce5b); $this->_setRangeParams($V21ffce5b); $this->_setRelatedSetsFilters($V21ffce5b); if (count($this->_findCriteria) || $this->_recordId) { $V21ffce5b['-find'] = true; } else { $V21ffce5b['-findall'] = true; } if ($this->_recordId) { $V21ffce5b['-recid'] = $this->_recordId; } if ($this->Vf951bdce) { $V21ffce5b['-lop'] = $this->Vf951bdce; } foreach ($this->_findCriteria as $Vd1148ee8 => $Ve9de89b0) { $V21ffce5b[$Vd1148ee8] = $Ve9de89b0; } $V0f635d0e = $this->_fm->_execute($V21ffce5b); if (FileMaker::isError($V0f635d0e)) { return $V0f635d0e; } return $this->_getResult($V0f635d0e); }
function &execute() { $V21ffce5b = $this->_getCommandParams(); $V21ffce5b['-findany'] = true; $V0f635d0e = $this->_fm->_execute($V21ffce5b); if (FileMaker::isError($V0f635d0e)) { return $V0f635d0e; } return $this->_getResult($V0f635d0e); }
function &execute() { if (empty($this->_recordId)) { $Vcb5e100e = new FileMaker_Error($this->_fm, 'Duplicate commands require a record id.'); return $Vcb5e100e; } $V21ffce5b = $this->_getCommandParams(); $V21ffce5b['-dup'] = true; $V21ffce5b['-recid'] = $this->_recordId; $V0f635d0e = $this->_fm->_execute($V21ffce5b); if (FileMaker::isError($V0f635d0e)) { return $V0f635d0e; } return $this->_getResult($V0f635d0e); }
function &execute() { $V090cbceb = null; $V8ac10dab = 0; $V31c3c8cf = 0; $V40677621 = 1; $Ve2942a04 = 1; $V21ffce5b = $this->_getCommandParams(); $this->_setSortParams($V21ffce5b); $this->_setRangeParams($V21ffce5b); $this->_setRelatedSetsFilters($V21ffce5b); ksort($this->Vad2bfd5a); $V31c3c8cf = count($this->Vad2bfd5a); foreach ($this->Vad2bfd5a as $V70a17ffa => $V9a7aa128) { $V15c46c6e = $V9a7aa128->_impl->_findCriteria; $V8ac10dab = count($V15c46c6e); $V090cbceb = $V090cbceb . '('; $V4111477f = 0; foreach ($V15c46c6e as $Vd1148ee8 => $Ve9de89b0) { $V21ffce5b['-q' . $Ve2942a04] = $Vd1148ee8; $V21ffce5b['-q' . $Ve2942a04 . '.' . "value"] = $Ve9de89b0; $V090cbceb = $V090cbceb . 'q' . $Ve2942a04; $Ve2942a04++; $V4111477f++; if ($V4111477f < $V8ac10dab) { $V090cbceb = $V090cbceb . ','; } } $V090cbceb = $V090cbceb . ")"; $V40677621++; if ($V40677621 <= $V31c3c8cf) { $V4b22ce92 = $this->Vad2bfd5a[$V40677621]; if ($V4b22ce92->_impl->_omit == true) { $V090cbceb = $V090cbceb . ';!'; } else { $V090cbceb = $V090cbceb . ';'; } } } $V21ffce5b['-query'] = $V090cbceb; $V21ffce5b['-findquery'] = true; $V0f635d0e = $this->_fm->_execute($V21ffce5b); if (FileMaker::isError($V0f635d0e)) { return $V0f635d0e; } return $this->_getResult($V0f635d0e); }
/** * Returns the string representation of $this->code in the language * currently set for PHP error messages in FileMaker Server Admin * Console. * * You should call getMessage() in most cases, if you are not sure whether * the error is a FileMaker Web Publishing Engine error with an error code. * * @return string Error description. */ function getErrorString() { // Default to English. $lang = basename($this->_fm->getProperty('locale')); if (!$lang) { $lang = 'en'; } static $strings = array(); if (empty($strings[$lang])) { if (!@(include_once dirname(__FILE__) . '/Error/' . $lang . '.php')) { include_once dirname(__FILE__) . '/Error/en.php'; } $strings[$lang] = $__FM_ERRORS; } if (isset($strings[$lang][$this->getCode()])) { return $strings[$lang][$this->getCode()]; } return $strings[$lang][-1]; }
function setFieldFromTimestamp($V972bf3f0, $Vd7e6d55b, $V6d786dc7 = 0) { $Vc6140495 =& $this->_fm->getLayout($this->_layout); if (FileMaker::isError($Vc6140495)) { return $Vc6140495; } $V06e3d36f = $Vc6140495->getField($V972bf3f0); if (FileMaker::isError($V06e3d36f)) { return $V06e3d36f; } switch ($V06e3d36f->getResult()) { case 'date': return $this->setField($V972bf3f0, date('m/d/Y', $Vd7e6d55b), $V6d786dc7); case 'time': return $this->setField($V972bf3f0, date('H:i:s', $Vd7e6d55b), $V6d786dc7); case 'timestamp': return $this->setField($V972bf3f0, date('m/d/Y H:i:s', $Vd7e6d55b), $V6d786dc7); } return new FileMaker_Error($this->_fm, 'Only time, date, and timestamp fields can be set to the value of a timestamp.'); }
function parse($V0f635d0e) { if (empty($V0f635d0e)) { return new FileMaker_Error($this->_fm, 'Did not receive an XML document from the server.'); } $this->V5431b8d4 = xml_parser_create('UTF-8'); xml_set_object($this->V5431b8d4, $this); xml_parser_set_option($this->V5431b8d4, XML_OPTION_CASE_FOLDING, false); xml_parser_set_option($this->V5431b8d4, XML_OPTION_TARGET_ENCODING, 'UTF-8'); xml_set_element_handler($this->V5431b8d4, '_start', '_end'); xml_set_character_data_handler($this->V5431b8d4, '_cdata'); if (!@xml_parse($this->V5431b8d4, $V0f635d0e)) { return new FileMaker_Error($this->_fm, sprintf('XML error: %s at line %d', xml_error_string(xml_get_error_code($this->V5431b8d4)), xml_get_current_line_number($this->V5431b8d4))); } xml_parser_free($this->V5431b8d4); if (!empty($this->Vcb5e100e)) { return new FileMaker_Error($this->_fm, null, $this->Vcb5e100e); } if (version_compare($this->Vf5bf48aa['version'], FileMaker::getMinServerVersion(), '<')) { return new FileMaker_Error($this->_fm, 'This API requires at least version ' . FileMaker::getMinServerVersion() . ' of FileMaker Server to run (detected ' . $this->Vf5bf48aa['version'] . ').'); } $this->V6de51026 = true; return true; }
function getStyleType() { $Vb4a88417 = $this->_layout->loadExtendedInfo(); if (FileMaker::isError($Vb4a88417)) { return $Vb4a88417; } return $this->_styleType; }
function listLayouts() { $V0f635d0e = $this->_execute(array('-db' => $this->getProperty('database'), '-layoutnames' => true)); if (FileMaker::isError($V0f635d0e)) { return $V0f635d0e; } $V3643b863 = new FileMaker_Parser_FMResultSet($this); $Vb4a88417 = $V3643b863->parse($V0f635d0e); if (FileMaker::isError($Vb4a88417)) { return $Vb4a88417; } $V34d59fda = array(); foreach ($V3643b863->V6e52c40b as $V0b2c082c) { $V34d59fda[] = $V0b2c082c['fields']['LAYOUT_NAME'][0]; } return $V34d59fda; }
function getRelatedRecordById($V97f7e518, $Va6ec9c02) { $Vaca007a7 = $this->getRelatedSet($V97f7e518); if (FileMaker::IsError($Vaca007a7)) { $Vcb5e100e = new FileMaker_Error($this->_fm, 'Related set "' . $Vaca007a7 . '" not present.'); return $Vcb5e100e; } else { foreach ($Vaca007a7 as $V1b7d5726) { if ($V1b7d5726->getRecordId() == $Va6ec9c02) { return $V1b7d5726; } } $Vcb5e100e = new FileMaker_Error($this->_fm, 'Record not present.'); return $Vcb5e100e; } }
function loadExtendedInfo($Vd33e904c = null) { if (!$this->_extended) { if ($Vd33e904c != null) { $V0f635d0e = $this->_fm->_execute(array('-db' => $this->_fm->getProperty('database'), '-lay' => $this->getName(), '-recid' => $Vd33e904c, '-view' => null), 'FMPXMLLAYOUT'); } else { $V0f635d0e = $this->_fm->_execute(array('-db' => $this->_fm->getProperty('database'), '-lay' => $this->getName(), '-view' => null), 'FMPXMLLAYOUT'); } $V3643b863 = new FileMaker_Parser_FMPXMLLAYOUT($this->_fm); $Vb4a88417 = $V3643b863->parse($V0f635d0e); if (FileMaker::isError($Vb4a88417)) { return $Vb4a88417; } $V3643b863->setExtendedInfo($this); $this->_extended = true; } return $this->_extended; }
function &_getResult($V0f635d0e) { $V3643b863 = new FileMaker_Parser_FMResultSet($this->_fm); $Vb4a88417 = $V3643b863->parse($V0f635d0e); if (FileMaker::isError($Vb4a88417)) { return $Vb4a88417; } $Vd1fc8eaf = new FileMaker_Result($this->_fm); $Vb4a88417 = $V3643b863->setResult($Vd1fc8eaf, $this->V0b9a204c); if (FileMaker::isError($Vb4a88417)) { return $Vb4a88417; } return $Vd1fc8eaf; }