Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 5
0
 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.');
 }
Exemplo n.º 6
0
 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;
 }
Exemplo n.º 8
0
 function _commitEditChild()
 {
     foreach ($this->_fields as $V972bf3f0 => $Vee0525e4) {
         foreach ($Vee0525e4 as $V6d786dc7 => $V2063c160) {
             if (!empty($this->V5e7ec2d5[$V972bf3f0][$V6d786dc7])) {
                 $V8977dfac[$V972bf3f0 . '.' . $this->_recordId][$V6d786dc7] = $V2063c160;
             }
         }
     }
     $V1dccadfe =& $this->_fm->newEditCommand($this->_parent->_impl->_layout->getName(), $this->_parent->getRecordId(), $V8977dfac);
     $Vd1fc8eaf = $V1dccadfe->execute();
     if (FileMaker::isError($Vd1fc8eaf)) {
         return $Vd1fc8eaf;
     }
     $V6e52c40b =& $Vd1fc8eaf->getRecords();
     $Vd0e45878 =& $V6e52c40b[0];
     $V268184c1 =& $Vd0e45878->getRelatedSet($this->_layout->getName());
     foreach ($V268184c1 as $V1b7d5726) {
         if ($V1b7d5726->getRecordId() == $this->_recordId) {
             return $this->_updateFrom($V1b7d5726);
             break;
         }
     }
     return new FileMaker_Error('Failed to find the updated child in the response.');
 }
Exemplo n.º 9
0
 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;
 }
Exemplo n.º 10
0
 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;
 }